# @Time: 2025/4/29 16:02
# @Author: chenhui
import os

def get_project_path():
    """
    获取项目目录
    :return:
    """
    project_name = "trading_system_api_autotest"
    file_path = os.path.dirname(__file__)
    return file_path[:file_path.find(project_name)+len(project_name)]


def sep(path,add_sep_before=False,add_sep_after=False):
    """
    系统分隔符
    :param path: 路径列表，类型为数组
    :param add_sep_before:是否需要在拼接的路径前面加一个分隔符
    :param add_sep_after: 是否需要再拼接路径后面加一个分隔符
    :return:
    """
    all_path = os.sep.join(path)
    if add_sep_before:
        all_path = os.sep + all_path
    if add_sep_after:
        all_path =all_path + os.sep
    return all_path